// 在这里面定义所有接口，一个文件管理所有接口，易于维护
import {
  http
} from './http'; // 引入刚刚封装好的http模块，import属于ES6的语法，微信开发者工具必须打开ES6转ES5选项

//会议室列表
function list(postData, doSuccess, doFail, doComplete) {
  http('meetingRoom/list', 'post', postData, doSuccess, doFail, doComplete)
}
//会议室预约记录
function getMeetingRoomReservationRecord(postData, doSuccess, doFail, doComplete) {
  http('/meetingRoom/getMeetingRoomReservationRecord', 'post', postData, doSuccess, doFail, doComplete)
}
//会议室预约
function save(postData, doSuccess, doFail, doComplete) {
  http('meetingReservation/save', 'post', postData, doSuccess, doFail, doComplete)
}
//取消预约
function del(postData, doSuccess, doFail, doComplete) {
  http('meetingReservation/del', 'post', postData, doSuccess, doFail, doComplete)
}

//添加会议室
function meetingRoomsave(postData, doSuccess, doFail, doComplete) {
  http('/meetingRoom/save', 'post', postData, doSuccess, doFail, doComplete)
}

//修改会议室
function meetingRoomupdateById(postData, doSuccess, doFail, doComplete) {
  http('/meetingRoom/updateById', 'post', postData, doSuccess, doFail, doComplete)
}
//删除会议室
function meetingRoomdel(postData, doSuccess, doFail, doComplete) {
  http('/meetingRoom/del', 'post', postData, doSuccess, doFail, doComplete)
}

export default { // 暴露接口
  list,
  getMeetingRoomReservationRecord,
  save,
  del,
  meetingRoomsave,
  meetingRoomupdateById,
  meetingRoomdel
}